﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Input;

namespace Trackr.GUI.Views
{
	public partial class DayView : UserControl
	{
		public DayView()
		{
            this.InitializeComponent();
		}

	    public void HandleKeyDownEvent(object sender, KeyEventArgs e)
        {
            if (e.Key == Key.C && Keyboard.Modifiers.HasFlag(ModifierKeys.Control))
            {
                var selectedTaskobj = stackPanelTimeItems.SelectedItem;
                var selectedTask = selectedTaskobj as TimeItemView;
                if (selectedTask != null){
                    Clipboard.SetText(selectedTask.TaskDescription);   
                }
                MessageBox.Show("CTRL + C trapped");
            }
        }

		public DayView(DateTime date)
		{
			this.InitializeComponent();
			this.LabelDate.Content = date.ToString("MMM dd");
		}
	}
}
